#ifndef LEXER_H
#define LEXER_H

#include "Token.h"
#include "STable.h"

enum LexerState{
    SLexerBegin,
    SLexerChar,
    SLexerCharStat,
    SLexerString,
    SLexerStringStat,
    SLexerComment,
    SLexerVariable
};

class Lexer
{
    public:
        Lexer();
        virtual ~Lexer();
        void setBuffer(char *buff,int size);
        Token *getToken();
        Token *getKeyToken();
    protected:
    private:
        char *buff;
        char *ebuff;
        int size;
        ////////////////////
        Token *ptoken;
        char *tokenstr;
        int tokenlen;
        LexerState state;
        STable *ptable;
};



#endif // LEXER_H
